#ifndef __BUSINESSSERVICE_H_
#define __BUSINESSSERVICE_H_

#include "TcpConnection.hpp"
#include <iostream>

using std::cout;
using std::endl;

class MyTask{
public:
    MyTask(const string & msg,ln::TcpConnectionPtr conn)
    :_msg(msg)
    ,_conn(conn)
    {

    }

    void process(){
        cout << "compute thread " << pthread_self() 
             << ",MyTask::process is running..." << endl;

        string response(_msg);
        _conn->sendInLoop(response);
    }

private:
    string               _msg;
    ln::TcpConnectionPtr _conn;
};

#endif

